cmake_minimum_required(VERSION 3.22.0)

project(linktest)

include_directories(include)

set(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/lib)

set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin)

add_library(_s STATIC ./src/func1.cpp)

list(APPEND libs _s)

add_library(_d SHARED ./src/func2.cpp)

list(APPEND libs _d)

message(STATUS "libs = ${libs}")

add_executable(main main.cpp)

target_link_libraries(main ${libs})
 